import { App } from 'vue';
export const SEND_TEST_CMD_KEY = "send-test-cmd"; // 协商好的字符串Key
export const GET_TEST_DATA_KEY = "get-test-data"; // 配套的“获取数据”Key

import { ModuleConfig } from '../common';
import { Response } from '../common';

export interface ModuleInterfaceTest<
  EventData extends object = object, // 约束为对象类型，支持 Object.assign
  CmdParams = any,
  Return = Response
> {
  config: ModuleConfig;
  install(app: App): void;
  startup(): Promise<void>;
  dataEvent(data: Partial<EventData>): void;
  readonly eventData: EventData;
  sendCommand(cmd: string, cmdParams?: CmdParams): Return | Promise<Return>;
  updateState(state: any): void;
}